<template>
    <el-row>
		<!--顶部工具菜单-->
		<el-col :span="24">
			<div class="ef-tooltar">
				<el-link type="primary" :underline="false">{{this.frameData.flowInfo.name}}</el-link>
				<el-divider direction="vertical"></el-divider>
				<el-link type="primary" :underline="false">{{this.activeElement.type}}</el-link>
				<el-divider direction="vertical"></el-divider>
				<el-button type="text" icon="el-icon-delete" size="large" @click="deleteElement" :disabled="!this.activeElement.type"></el-button>
				<el-divider direction="vertical"></el-divider>
				<el-button type="text" icon="el-icon-download" size="large" @click="downloadData"></el-button>
				<el-divider direction="vertical"></el-divider>
				<el-button type="text" icon="el-icon-plus" size="large" @click="zoomAdd"></el-button>
				<el-divider direction="vertical"></el-divider>
				<el-button type="text" icon="el-icon-minus" size="large" @click="zoomSub"></el-button>
				<div style="float: right;margin-right: 5px">
					<el-button type="info" plain round icon="el-icon-document" @click="uploadFlow" size="mini">上传流程</el-button>
					<el-button type="info" plain round icon="el-icon-document" @click="dataInfo" size="mini">流程信息</el-button>
					<el-button type="info" plain round icon="el-icon-document" @click="productInfo" size="mini">成品信息</el-button>
					<el-button v-for="item in btnList" type="primary" plain round @click="btnClick(item.code)" :icon="item.icon?item.icon:'el-icon-refresh'" size="mini">{{item.name}}</el-button>
					<el-button type="info" plain round icon="el-icon-document" @click="openHelp" size="mini" v-if="showHelp">帮助</el-button>
				</div>
			</div>
		</el-col>
	</el-row>
</template>

<script>
    export default {
        props: {
            frameData: Object,
            activeElement: Object,
			showHelp:true,
			btnList:Array
        },
        data() {
            return {
				"data":{name:"test"}
			}
        },
        computed: {
            
        },
        methods: {
            // 点击节点
            deleteElement() {
                this.$emit('deleteElement', null)
            },
			openHelp() {
                this.$emit('openHelp', null)
            },
            downloadData() {
                this.$emit('downloadData', null)
            },
			zoomAdd() {
                this.$emit('zoomAdd', null)
            },
			zoomSub() {
                this.$emit('zoomSub', null)
            },
			dataInfo() {
                this.$emit('dataInfo', null)
            },
			productInfo(){
				this.$emit('productInfo', null)
			},
			btnClick(code){
				this.$emit('btnClick', code)
			},
			uploadFlow(){
				this.$emit('flowUpload', null)
			}
        }
    }
</script>
